package main

import (
	"context"
	"fmt"
	"newtomicroc/grpcconn/pb"
	"newtomicroc/rpcconn/pb/grpc-go"
)

func main() {

	//连接服务
	grpcConn, _ := grpc.Dial("127.0.0.1:8800", grpc.WithInsecure())
	defer grpcConn.Close()
	//初始化gprc客户端
	grpcClinet := pb.NewHelloClient(grpcConn)

	//调用远程函数
	var person pb.Person
	person.Name = "wangtu"
	person.Age = 13

	p, _ = grpcClinet.SayHello(context.TODO(), &person)

	fmt.Println(p, err)
}
